1. Field of the Invention
The present invention relates to a structured-document database having a hierarchical logic structure.
2. Description of the Related Art
There are structured-document management systems of different schemes for storing and searching structured document data written in, for example, Extensible Markup Language (XML).
(1) A simple scheme for managing structured document data as text file data: In this scheme, when the data amount or size is increased, the efficiency of storage may well be degraded, or it may become difficult to perform searches utilizing the characteristics of structured documents.
(2) A scheme for storing structured document data in a relational database (RDB).
(3) A scheme for performing management utilizing an object-oriented database (OODB) developed to manage structured document data RDBs are widely utilized in fundamental systems. Further, XML-enabled RDBs as extended RDBs are available. Since RDBs store data in the form of a flat table, they require complex mapping that enables XML data of a hierarchical structure to correspond to a table. Because of this mapping, the performance may well be degraded unless a satisfactory schema is designed for tables in advance.
New schemes other than the above-mentioned ones (1 to 3) have recently been proposed.
(4) A scheme for simply managing structured document data: In this scheme, XML data having various hierarchical structures are stored without any particular mapping processing. Accordingly, no particular overhead exists during storage or acquisition of data. Further, this scheme does not require pre-schema-designing that costs much, which enables the structure of XML data to be easily changed in accordance with changes in business circumstances.
Even if structured document data is efficiently stored, there is no meaning unless means for acquiring stored data exists. A query language exists as means for acquiring stored data. Like Structured Query Language (SQL) in the field of RDBs, XML Query Language (XQuery) is defined. XQuery is a language for treating XML data as a database. There is provided means for acquiring, collecting and/or analyzing data sets suitable for a condition. Moreover, since XML data has a hierarchical structure in which elements, such as parent/children and siblings, are combined, means for following the structure is provided.
Jpn. Pat. Appln. KOKAI Publications Nos. 2002-34618 and 2000-57163, for example, disclose a technique for following the hierarchical structure of stored structured document data to search for structured document data that includes a particular element and structure designated by search conditions.
In general, the larger the scale of structured document data, the larger the number of structured document data items stored in a database, and the more complex the search conditions, the more time the process of following the elements included in the hierarchical structure of each structured document data item requires. Furthermore, as the number of structured document data items stored and the size of each structured document data item increase, it becomes impossible to process the data items in a memory, and hence most of them are stored in secondary storage such as a hard disk.
In the scheme for simply managing structured document data, the hierarchical structure of the elements of the structured document data is stored directly. Therefore, to check whether there is an element or structure designated by search conditions, it is necessary to frequently access the elements of the structured document data stored in secondary storage. The same can be said all the more of complex search conditions.
In the reference art, when a structured document data item having a desired element or structure is retrieved from a database that stores structured document data items having hierarchical structures, it is searched for using search conditions while the elements of the hierarchical structure of each structured document data item in the database are traversed. Therefore, high-speed search is impossible. The greater the size of each structured document data item, the larger the number of structured document data items to be searched for, and the more complex the search conditions, the more difficult the speed of search processing to enhance.